<template>
  <div>
    <el-carousel class="model1" :interval="5000" arrow="always" height="600px;">
      <el-carousel-item v-for="(item,index) in header" :key="index" class="sywz" >
        <img class="imdt" :src="item.url" />
        <p class="medium1" >{{item.name}}</p>
        <p class="medium2" >{{item.con}}</p>
      </el-carousel-item>
    </el-carousel>
    <div class="model2">
       <div class="photo">
        <p
          style="
            font-size: 42px;
            font-family: DFLiJinHeiW8-GB, DFLiJinHeiW8-GB-Regular;
            font-weight: 400;
            text-align: center;
            color: #279e70;
            line-height: 120px;
            margin: 0;
          "
        >
          标志景点
          <span style="position: relative;top: -85px;font-size:25px;">
            BIAOZHIJINGDIAN
          </span>

        </p>
      </div>
      <div class="bzjd">
        <div class="box1" v-for="(item,index) in attractlis.slice(0,3)" :key="index" @click="jdxq(item)">
          <div style="width: 100%; height: 60%">
            <img
              :src="item.headpic"
              style="width: 100%; height: 100%"
            />
          </div>
          <div style="width: 100%; height: 36%">
            <div>
              <p
                style="
                  font-size: 31px;
                  font-family: PingFang SC, PingFang SC-Semibold;
                  font-weight: 600;
                  color: #000000;
                  line-height: 32px;
                  margin-left: 20px;
                  margin-bottom: 0px;
                  margin-top: 10px;
                  overflow: hidden;
                  display: -webkit-box;
                  -webkit-line-clamp: 1;
                  -webkit-box-orient: vertical;
                  text-overflow: ellipsis;
                "
              >
                {{item.name}}
              </p>
              <span
                style="
                  overflow: hidden;
                  display: -webkit-box;
                  -webkit-line-clamp: 3;
                  -webkit-box-orient: vertical;
                  text-overflow: ellipsis;
                  font-size: 14px;
                  font-family: PingFang SC, PingFang SC-Regular;
                  font-weight: 400;
                  text-align: left;
                  color: #333333;
                  line-height: 25px;
                  padding: 16px 10px 0px 20px;
                "
                >
                {{item.note}}
                </span
              >
            </div>
          </div>
        </div>

      </div>
    </div>
    <div class="model3">
      <div class="photo" >
        <p
          style="
            font-size: 42px;
            font-family: DFLiJinHeiW8-GB, DFLiJinHeiW8-GB-Regular;
            font-weight: 400;
            text-align: center;
            color: #279e70;
            line-height: 120px;
            margin:0;
          "
        >
          图文攻略
          <span style="position: relative;top: -85px;font-size:25px;">
            TUWENGONGLUE
          </span>
        </p>
      </div>
      <div class="bzjd">
        <div class="box1" style="padding: 10px; border: 1px solid #d9d9d9" v-for="(item,index) in stralis.slice(0,3)" :key="index" @click="toDetail(item)">
          <div style="width: 100%; height: 60%">
            <img
              :src="item.first_pic"
              style="width: 100%; height: 100%"
            />
          </div>
          <div style="width: 100%; height: 40%">
            <div>
              <span
                style="
                  overflow: hidden;
                  display: -webkit-box;
                  -webkit-line-clamp: 2;
                  -webkit-box-orient: vertical;
                  text-overflow: ellipsis;
                  font-size: 26px;
                  font-family: PingFang SC, PingFang SC-Semibold;
                  font-weight: 600;
                  text-align: left;
                  color: #333333;
                  line-height: 40px;
                  height: 80px;
                "
                >{{item.title}}</span><br />
              <span
                style="
                  color: #333333;
                  font-size: 18px;
                  font-family: PingFang SC, PingFang SC-Regular;
                  font-weight: 400;
                  text-align: right;
                  color: #333333;
                  line-height: 32px;
                "
                >{{item.update_time_s}}</span
              >
            </div>
          </div>
        </div>

      </div>
    </div>
    <div style="    display: flex;
    justify-content: center;">
      <div class="photo" style="margin-top:0;">
      <p
        style="
          font-size: 42px;
          font-family: DFLiJinHeiW8-GB, DFLiJinHeiW8-GB-Regular;
          font-weight: 400;
          text-align: center;
          color: #279e70;
          line-height: 120px;
          margin:0;
        "
      >
        宣传视频
        <span style="position: relative;top: -85px;font-size:25px;">
          XUANCHUANSHIPING
        </span>
      </p>
    </div>
    </div>
    <!-- 宣传视频 -->
    <div class="model4">
      <div class="ship">
        <video :src="videot[0].url" controls :poster="videot[0].pic" style="width: 100%; height: 100%" ></video>
      </div>
      <div class="shipA">
        <div class="shpB" v-for="(item,index) in videot.slice(1,5)" :key="index">
            <video :src="item.url" controls :poster="item.pic" style="width: 100%; height: 100%" ></video>
        </div>
       <!-- <div class="shpB">
          <img src="../assets/image/2.png" style="width: 100%; height: 100%" />
        </div>
        <div class="shpB">
          <img src="../assets/image/3.png" style="width: 100%; height: 100%" />
        </div>
        <div class="shpB">
          <img src="../assets/image/4.png" style="width: 100%; height: 100%" />
        </div>-->
      </div>
    </div>
    <!-- 景点住宿 -->
    <div class="model5" >
      <div style="display: flex;justify-content: center;">
        <div class="photo" style="margin-top:0;">
          <p
            style="
              font-size: 42px;
              font-family: DFLiJinHeiW8-GB, DFLiJinHeiW8-GB-Regular;
              font-weight: 400;
              text-align: center;
              color: #279e70;
              line-height: 120px;
              margin:0;
            "
          >
            景点住宿
            <span style="position: relative;top: -85px;font-size:25px;">
              JINGDIANZHUSU
            </span>
          </p>
        </div>
      </div>

      <div class="jdzs"  v-for="(item,index) in holetlis" :key="index">
        <div class="imgStyle">
          <img :src="item.thumb" style="width:100%;height:100%;"/>
        </div>
        <div class="titleStyle">
          <div class="btwz">
            <div style="margin: 20px 0;display: inline-block;">{{item.title}}</div><br/>
            <div style="display: inline-block;"></div>
            <!-- <div style="display: inline-block;float:right;margin-right:30px;margin-top:-30px;">￥298</div> -->
          </div>
          <div class="btwz1"></div>
          <div class="btwz2" style="height:56px;">
            <span>
              {{item.note}}
            </span>
          </div>
          <div class="btwz2" style="color: #999999">
            <span> 电话：{{item.contact}} </span>
          </div>
          <div class="btwz2" style="color: #999999">
            <span> 地址：{{item.address}} </span>
          </div>
          <div style="position: relative; top: 14px; right: 31px">
            <el-button
              style="
                background: #009a7e;
                color: #fff;
                border-radius: 0;
                float: right;
              "
              @click="linkTo(item)"
              >查看详情</el-button
            >
          </div>
        </div>
      </div>

    </div>
  </div>
</template>
<script>
import { service } from '@/request'
export default {
  data () {
    return {
      header: [],
      attractlis: [],
      stralis: [],
      videot: [
        { url: '' }
      ],
      holetlis: []
    }
  },
  created () {},
  mounted () {
    this.Carousel()
    this.Attractlist()
    this.Strategylist()
    this.Videolist()
    this.Holete()
  },
  methods: {
    linkTo (item) {
      // console.log("item",item)
      window.open(item.href)
    },
    toDetail (item) {
      this.$router.push(
        {
          path: '/lqxx',
          query: {
            id: item.id,
            origin: 'strategy'
          }
        }
      )
    },
    // 景点详情
    jdxq (item) {
      this.$router.push({
        path: '/jdxq',
        query: {
          id: item.id
        }
      })
    },
    // 标志景点
    Attractlist () {
      service({
        url: '/go/attractlist',
        method: 'post',
        data: { recommed: 1 }
      }).then((res) => {
        if (res.code == 200) {
          // console.log("res",res.data)
          this.attractlis = res.data
        }
      })
    },
    // 轮播图
    Carousel () {
      service({
        url: '/go/carousel',
        method: 'post',
        data: {}
      }).then((res) => {
        if (res.code === 200) {
          // console.log("header",res.data)
          this.header = res.data
        }
      })
    },

    // 攻略
    Strategylist () {
      service({
        url: '/go/strategylist',
        method: 'post',
        data: {}
      }).then((data) => {
        if (data.code == 200) {
          this.stralis = data.data
        }
      })
    },

    // 视频
    Videolist () {
      service({
        url: '/go/attractvedio',
        method: 'post',
        data: {}
      }).then((res) => {
        if (res.code == 200) {
          this.videot = res.data
        }
      })
    },

    // 酒店
    Holete () {
      service({
        url: '/go/hotlelist',
        method: 'post',
        data: {}
      }).then((res) => {
        if (res.code == 200) {
          this.holetlis = res.data
        }
      })
    }

  }
}
</script>
<style scoped>

.model1 {
  width: 99.9%;
  height: 600px;
  background: url("../assets/image/dpm1.png") no-repeat;
  background-size: 100% 100%;
}
.sywz {
  font-size: 49px;
  font-family: PingFang SC, PingFang SC-Semibold;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  margin-top: 0;
}
.model2 {
  width: 99.9%;
  height: 600px;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  background: url("../assets/image/bjt1.png") no-repeat;
  background-size: 100% 100%;
  flex-direction: column;
}
.photo {
  width: 333px;
  height: 158px;
  text-align: center;
  background: url("../assets/image/gysq.png") no-repeat;
  background-size: 100% 100%;
  display: flex;
  justify-content: center;
  margin-top: -70px;

  /* position: absolute;
  left: 41%;
  top: 64%; */
  /* display: block; */
}
.bzjd {
  width: 70%;
  height: 60%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
.box1 {
  width: 30%;
  height: 100%;
  display: inline-block;
  background: #fff;
}
.model3 {
  width: 99.9%;
  height: 600px;
  display: flex;
  justify-content: center;
  align-content: center;
  align-items: center;
  flex-direction: column;
}
.model4 {
  width: 99.9%;
  height: 600px;
  flex-direction: column;
}
.model5 {
  width: 99.9%;
  height: 600px;
  display: inline-table;
  justify-content: center;
  align-content: center;
  align-items: center;
  background: url("../assets/image/bjt1.png") no-repeat;
  background-size: 100% 100%;
  flex-direction: column;
}
.jdzs {
  margin:15px auto;
  width: 70%;
  height: 300px;
}
.imgStyle {
  width: 30%;
  height: 100%;
  display: inline-block;
  float: left;
  /* background: url("../assets/image/jd.png") no-repeat; */
  /* background-size: 100% 100%; */
}
.titleStyle {
  width: 69.5%;
  height: 100%;
  display: inline-block;
  background: #fff;
}
.ship {
  width: 50%;
  height: 100%;
  display: inline-block;
  /* background: url("../assets/image/pinmu.png") no-repeat; */
  /* background-size: 100% 100%; */
}
.shipA {
  width: 50%;
  height: 100%;
  display: inline-block;
}
.shpB {
  width: 50%;
  height: 50%;
  display: inline-block;
}
.btwz {
  font-size: 31px;
  font-family: Source Han Sans SC, Source Han Sans SC-Regular;
  font-weight: 400;
  text-align: left;
  color: #000000;
  line-height: 28px;
  margin-left: 25px;
}
.btwz2 {
  font-size: 14px;
  font-family: Source Han Sans SC, Source Han Sans SC-Regular;
  font-weight: 400;
  text-align: left;
  color: #000000;
  line-height: 28px;
  margin-left: 25px;
  padding-right: 15px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

    .el-carousel__item h3 {
    color: #475669;
    font-size: 18px;
    opacity: 0.75;
    line-height: 300px;
    margin: 0;
  }

 .imdt{
  max-width: 100%;
  height: auto;

 }
.medium{
position: absolute;
    left: 5rem;
    bottom: 10rem;
    font-size: 50px;
    color: white;
    /* text-decoration-line: underline; */
    font-weight: 900;
    font-family:Georgia, 'Times New Roman', Times, serif;
    font-size: 48px;
    line-height: 100%;
    display: flex;
    align-items: center;
    flex: none;
    order: 1;
    align-self: stretch;
}
.nameSty{
    position: absolute;
    left: 5rem;
    bottom: 10rem;
    font-size: 50px;
    color: white;
    /* text-decoration-line: underline; */
    font-weight: 900;
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-size: 48px;
    line-height: 100%;
    display: flex;
    align-items: center;
    flex: none;
    order: 1;
    align-self: stretch;
}
/deep/ .el-carousel__container {
    position: relative;
    height: 600px;
}
 .imdt{
  width: 100%;
  height: 100%;

 }
.medium2{
position: absolute;
    left: 5rem;
    bottom: 10rem;
    font-size: 50px;
    color: white;
    /* text-decoration-line: underline; */
    font-weight: 900;
    font-family:Georgia, 'Times New Roman', Times, serif;
    font-size: 48px;
    line-height: 100%;
    display: flex;
    align-items: center;
    flex: none;
    order: 1;
    align-self: stretch;
}
.medium1{
    position: absolute;
    left: 5rem;
    bottom: 15rem;
    font-size: 50px;
    color: white;
    /* text-decoration-line: underline; */
    font-weight: 900;
    font-family:Georgia, 'Times New Roman', Times, serif;
    font-size: 48px;
    line-height: 100%;
    display: flex;
    align-items: center;
    flex: none;
    order: 1;
    align-self: stretch;
}

</style>
